<?php
//register qtip

$table=new CI_Table();
/* @var $model Dispatchdetails */
$rand=rand(0,99999999);
echo "<script>
$(document).ready(function(){
    $('.$rand').hide();
    $('#$linkId').ntip({
        content:'.$rand'
        });
    });

</script>";

$model=$tech->dispatchModel;
$table->set_template(array(
    'table_open'=>'<table width="400px">',
    
    ));
if($model!=NULL){
    $table->add_row('<b>Dispatch</b>',$model->dispatch. ' - '.trim(substr($tech->dispatchModel->department,0,4)));
    if($model->location!=NULL){
        $table->add_row('<b>Location</b>',$model->location->locname);
        $table->add_row(
            array(
                'data'=>'<b>Address</b>',
                'style'=>'vertical-align: top;'
            ),
            $model->location->add1.'<br/>'.$model->location->city.' '.$model->location->state.' '.$model->location->zip
        );
        
    }
    $table->add_row('<b>Date</b>',$model->receiveddate);
    $table->add_row('<b>Time</b>',$model->receivedtime);
    $table->add_row('<b>Status</b>',$tech->status);    
    $table->add_row(
        array(
            'data'=>'<b>Note</b>',
            'style'=>'vertical-align: top;'
        ),
        $model->notes
    );
    echo CHtml::tag('div',array('class'=>$rand.' dispatch-info'),$table->generate());
    //echo $table->generate();
}

?>
